{{-- resources\views\admin\article.blade.php --}}
@extends('index')
@section('title', $title ?? '未命名')

@section('body')
@parent
{{--
<link rel="stylesheet" href="/css/admin.css"> --}}

{{-- 头部 --}}
{{-- <header>
	@include('home.header')
</header> --}}

{{-- 主体 --}}
{{-- <main class="container-fluid">
	@include('admin.main')
</main> --}}

@include('custom.phpFunction')
{{-- @include('custom.modal') --}}

<table class="table table-striped">
	<thead>
		<tr>
			<th scope="col">Aid</th>
			<th scope="col">文章名称</th>
			<th scope="col">内容</th>
			<th scope="col">操作</th>
		</tr>
	</thead>
	<tbody>

		@foreach ($list as $article)
		<tr>
			<th scope="row">{{ $article->aid }}</th>
			<td>
				{{ merge_str($article->title, $article->title2) }}
			</td>
			<td>{{ cut_str($article->content, 30, '…') }}</td>
			<td>
				<a href="/adminUpdate/{{ $article->aid }}"><button type="button" class="btn btn-outline-dark btn-sm">修改</button></a>
				<a href="/adminDelete/{{ $article->aid }}"><button type="button" class="btn btn-danger btn-sm">删除</button></a>
			</td>
		</tr>
		@endforeach

	</tbody>
</table>

{{-- 尾部 --}}
{{-- <footer>
	@include('admin.footer')
</footer> --}}
@endsection


